<?php

if($_POST['msgid']){
	include_once('config.php');
	include_once(mnminclude.'KMessaging.php');

	$box = $_POST['box'];
	$message =  new KMessaging();
	$message->tblName = table_messages;
	$sendmsg = $message->DeleteMessege($_POST['msgid'], $_POST['box']);
	//echo $sendmsg . " end sql";
	//die();
	switch ($sendmsg) {
		case 0:
			echo "success";
			die();
			break;
		case 2:
			echo "database_error";
			die();
			break;
		default:
			echo "fail";
			die();
			break;
	}
}
?>